package com.ruoyi.bus.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bus.mapper.WitChangeDriverMapper;
import com.ruoyi.bus.domain.WitChangeDriver;
import com.ruoyi.bus.service.IWitChangeDriverService;

/**
 * 更改司机记录表Service业务层处理
 * 
 * @author caiyanshan
 * @date 2021-07-27
 */
@Service
public class WitChangeDriverServiceImpl implements IWitChangeDriverService 
{
    @Autowired
    private WitChangeDriverMapper witChangeDriverMapper;

    /**
     * 查询更改司机记录表
     * 
     * @param recordId 更改司机记录表ID
     * @return 更改司机记录表
     */
    @Override
    public WitChangeDriver selectWitChangeDriverById(Long recordId)
    {
        return witChangeDriverMapper.selectWitChangeDriverById(recordId);
    }

    /**
     * 查询更改司机记录表列表
     * 
     * @param witChangeDriver 更改司机记录表
     * @return 更改司机记录表
     */
    @Override
    public List<WitChangeDriver> selectWitChangeDriverList(WitChangeDriver witChangeDriver)
    {
        return witChangeDriverMapper.selectWitChangeDriverList(witChangeDriver);
    }

    /**
     * 新增更改司机记录表
     * 
     * @param witChangeDriver 更改司机记录表
     * @return 结果
     */
    @Override
    public int insertWitChangeDriver(WitChangeDriver witChangeDriver)
    {
        witChangeDriver.setCreateTime(DateUtils.getNowDate());
        return witChangeDriverMapper.insertWitChangeDriver(witChangeDriver);
    }

    /**
     * 修改更改司机记录表
     * 
     * @param witChangeDriver 更改司机记录表
     * @return 结果
     */
    @Override
    public int updateWitChangeDriver(WitChangeDriver witChangeDriver)
    {
        return witChangeDriverMapper.updateWitChangeDriver(witChangeDriver);
    }

    /**
     * 批量删除更改司机记录表
     * 
     * @param recordIds 需要删除的更改司机记录表ID
     * @return 结果
     */
    @Override
    public int deleteWitChangeDriverByIds(Long[] recordIds)
    {
        return witChangeDriverMapper.deleteWitChangeDriverByIds(recordIds);
    }

    /**
     * 删除更改司机记录表信息
     * 
     * @param recordId 更改司机记录表ID
     * @return 结果
     */
    @Override
    public int deleteWitChangeDriverById(Long recordId)
    {
        return witChangeDriverMapper.deleteWitChangeDriverById(recordId);
    }
}
